﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Tree.Factory
{
    /// <summary>
    /// Object Type Resolver.
    /// </summary>
    public interface IResolver
    {
        /// <summary>
        /// Gets a Type for it's namespace.
        /// </summary>
        /// <param name="type">String containing the namespace for the Type.</param>
        /// <returns>The Type object.</returns>
        Type TypeFrom(string type);

        /// <summary>
        /// Gets a Type for it's full name.
        /// </summary>
        /// <param name="type">String containing the namespace for the Type.</param>
        /// <param name="name">String containing the full name for the Type.</param>
        /// <returns>The Type object.</returns>
        Type TypeFromFullname(string type, string name);

        /// <summary>
        /// Gets the implementation Type for the parameterized interface Type.
        /// </summary>
        /// <param name="type">Interface type for the implementation.</param>
        /// <returns>The implementation Type.</returns>
        Type ImplFor(Type type);
    }
}
